import request from '@/router/axios'

export function fetchNewsList(query) {
  return request({
    url: "/admin/news/list",
    method: "get",
    params: query
  });
}

export function putNews(query) {
  return request({
    url: "/admin/news/put",
    method: "post",
    data: query
  });
}

export function newsDetail(query) {
  return request({
    url: "/admin/news/newsDetail",
    method: "get",
    params: query
  });
}


export function deleteNews (query) {
  return request({
    url: '/admin/news/delete',
    method: 'get',
    params: query
  })
}

export function cateList(query) {
  return request({
    url: "/admin/news/cateList",
    method: "get",
    params: query
  });
}

export function putCate(query) {
  return request({
    url: "/admin/news/putCate",
    method: "post",
    data: query
  });
}

export function deleteCate (query) {
  return request({
    url: '/admin/news/deleteCate',
    method: 'get',
    params: query
  })
}


export function fetchBannerList (query) {
  return request({
    url: '/admin/banner/actList',
    method: 'get',
    params: query
  })
}


export function putBanner(query) {
  return request({
    url: "/admin/banner/actPut",
    method: "post",
    data: query
  });
}

export function deleteBanner(query) {
  return request({
    url: "/admin/banner/actDelete",
    method: "get",
    params: query
  });
}

